package com.eazyimage.lab.controller;

import com.eazyimage.lab.entity.Response;
import com.eazyimage.lab.service.LoginService;
import com.eazyimage.lab.service.PackageMesService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


@RestController
public class PackageMesController {
    @Autowired
    PackageMesService pm;

    @Autowired
    LoginService ls;
    @RequestMapping("/Selectnum")
    public Response Selectnum(
            @RequestParam("username") String username,
            @RequestParam("password") String password){
     if(ls.login(username,password)==null)
         return Response.fail();
     return Response.success(pm.getuserdatasetid(username));

    }


}
